<?php
    require("../config.php");
    $result = mysql_query("SELECT * FROM cate_items");
    if (isset($_GET['btnSubmit'])){
        if ($_GET['txtCountry'] != "" && $_GET['txtSortCountry'] != ""){
            mysql_query("INSERT INTO cate_items(id, sort_name, country_items) VALUES('', '".$_GET['txtSortCountry']."', '".$_GET['txtCountry']."')");
            echo 'done';
        }
    }
?>
<!DOCTYPE HTML>
<html>
<head>
	<meta http-equiv="content-type" content="text/html" />
	<meta name="author" content="Invisible Man" />

	<title>Untitled 1</title>
</head>

<body>
    <table>
        <tr>
            <td>
                <form>
                    <fieldset>
                        <legend>Adding your Categories</legend>
                        <table>
                            <tr>
                                <td>
                                    Category : 
                                </td>
                                <td>
                                    <input type="text" name="txt_cate"/><br />
                                    <input type="submit" name="btnSubmit"/>
                                    <input type="reset"/>
                                </td>
                            </tr>
                        </table>
                    </fieldset>
                </form>
            </td>
        </tr>
    </table>
</body>
</html>